<%
# Copyright (C) 2011 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
%>

<%
  css_bundle :quizzes, :tinymce
  js_bundle :quizzes_bundle
  js_env :QUIZZES => {:QUIZ => true}
  content_for :page_title, (@quiz.quiz_title || !@quiz.quiz_title.empty? ? @quiz.quiz_title : t(:default_page_title, 'New Quiz'))
%>

<% unless editing_restricted?(@quiz, :content) %>
  <% content_for :right_side do %>
    {{> views/shared/wiki_sidebar}}
  <% end %>
<% end %>

<h1 class="screenreader-only"><%= @quiz.quiz_title %></h1>

<div id="quiz_edit_wrapper">
  {{> views/quiz_edit}}
</div>


<div class="question_generated" style="display: none;">
  <div class="question_generated_description"></div>
  <textarea style="width: 600px; height: 400px;" id="copy_paste_box"></textarea>
</div>
{{> views/equations_help}}
<div id="ip_filters_dialog" style="display: none;">
  <h2>{{#t}}What are Quiz IP Filters?{{/t}}</h2>
  <p class="explanation"><%= t(:ip_filters, <<-TEXT)
  Quiz IP filters are a way to limit access to quizzes to
  computers in a specified IP range.  Filters can be a comma-separated
  list of addresses, or an address followed by a mask
  ("192.168.217.1", "192.168.217.1/24" or "192.168.217.1/255.255.255.0").
  TEXT
  %></p>
  <p class="searching_message">{{#t}}Retrieving Filters...{{/t}}</p>
  <table class="filters" style="display: none;">
    <tbody>
      <tr class="ip_filter blank" style="display: none;" title="{{#t}}Click to select this filter{{/t}}">
        <td class="name_and_account">
          <div class="name">&nbsp;</div>
          <div class="account">&nbsp;</div>
        </td>
        <td class="filter">&nbsp;</td>
      </tr>
    </tbody>
  </table>
</div>
